MetaWorkspaceManager gained the ability to reorder workspaces, so make
sure to pick up the new order when that happens.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1497
let workspaceManager = global.workspace_manager;
workspaceManager.connect('notify::n-workspaces',
this._nWorkspacesChanged.bind(this));
+ workspaceManager.connect('workspaces-reordered', () => {
+ this._workspaces.sort((a, b) => a.index() - b.index());
+ });
global.window_manager.connect('switch-workspace',
this._queueCheckWorkspaces.bind(this));